package com.woniuxy.boot.common.bean;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;


import java.io.Serializable;
import java.time.LocalDateTime;
@Data
@Document(indexName = "esfeedback")
public class EsFeedback implements Serializable {
    @Id
    private Long id;
    /**
     * 用户id，反馈人
     */
    @Field(type = FieldType.Integer, value = "userId")
    private Integer userId;//反馈人
    @Field(type = FieldType.Text , value = "name")
    private String name;
    @Field(type = FieldType.Text , value = "phone")
    private String phone;
    @Field(type = FieldType.Text , value = "keyword")
    private String keyword;

    /**
     * 反馈内容
     */
    @Field(type = FieldType.Text , value = "content")
    private String content;//内容
    /**
     * 提交时间
     */
    @Field(type = FieldType.Date , value = "commitTime",format = {},pattern = "yyyy-MM-dd HH:mm:ss || yyyy-MM-dd'T'HH:mm:ss'+08:00' || strict_date_optional_time || epoch_millis")
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private LocalDateTime commitTime;//提交时间
    /**
     * 是否处理
     */
    @Field(type = FieldType.Text ,value = "isDispose")
    private String isDispose;//是否处理
    /**
     * 解决方案
     */
    @Field(type = FieldType.Text , value = "scheme")
    private String scheme;//解决方案
    /**
     * 处理人，管理员id
     */
    @Field(type = FieldType.Integer ,value = "adminId")
    private Integer adminId;//处理人
    /**
     * 问题
     */
    @Field(type = FieldType.Text , value = "issue")
    private String issue;//问题

}
